<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


    <title>H+ 后台主题UI框架 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台"/>
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术"/>

    <link rel="shortcut icon" href="favicon.ico"/>
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet"/>

    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet"/>

    <link href="css/animate.css" rel="stylesheet"/>
    <link href="css/style.css?v=4.1.0" rel="stylesheet"/>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>基本 <small>活动管理/活动列表</small></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="table_data_tables.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="table_data_tables.html#">选项1</a>
                                </li>
                                <li><a href="table_data_tables.html#">选项2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover">
                            <tbody>
                                <tr class="gradeX">
                                    <td>
                                        <form class="navbar-form navbar-left" role="search" method="post" action="wl_activity_commodity_fuzzyQuery">
                                            <div class="form-group">
                                                <select class="form-control selectpicker" name="hasfreight">
													<option value="">请选择是否包邮</option>
                                                    <option th:each="ByhasFreight:${wl_activity_commodity_getByhasFreight}" th:if="${ByhasFreight.hasfreight==0}" th:text="不包邮" th:value="0"></option>
                                                    <option th:each="ByhasFreight:${wl_activity_commodity_getByhasFreight}" th:if="${ByhasFreight.hasfreight==1}" th:text="包邮" th:value="1"></option>
												</select>

												<select class="form-control" name="type">
													<option value="">请选择活动类型</option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==1}" th:text="聚划算" th:value="1"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==2}" th:text="0元购" th:value="2"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==3}" th:text="每周特惠" th:value="3"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==4}" th:text="新人专区" th:value="4"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==5}" th:text="节日活动" th:value="5"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==6}" th:text="新品" th:value="6"></option>
                                                    <option th:each="ByType:${wl_activity_commodity_getByType}" th:if="${ByType.type==7}" th:text="热卖" th:value="7"></option>
                                                </select>

                                                <select class="form-control" name="status">
                                                    <option value="">请选择活动状态</option>
                                                    <option th:each="ByStatus:${wl_activity_commodity_getByStatus}" th:if="${ByStatus.status==0}" th:text="已过期" th:value="0"></option>
                                                    <option th:each="ByStatus:${wl_activity_commodity_getByStatus}" th:if="${ByStatus.status==1}" th:text="未过期" th:value="1"></option>
                                                </select>

                                                <br/>

                                                <label class="control-label">开始时间：</label>
												<input type="date" class="form-control" name="starttime"/>

                                                <label class="control-label">结束时间：</label>
                                                <input type="date" class="form-control" name="expiredtime"/>

                                                <button type="submit" class="btn btn-info ">查询</button>
                                                <br/>
                                            </div>          
                                        </form>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example table-responsive table-condensed">
                            <thead>
                            <tr>
                                <th>产品名称</th>
                                <th>活动价格</th>
								<th>原价</th>
                                <th>是否包邮</th>
                                <th>开始时间</th>
								<th>结束时间</th>
								<th>创建时间</th>
                                <th>修改时间</th>
                                <th>类型</th>
                                <th>状态</th>
                                <th>商品描述</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="activity_commodity:${wl_activity_commodity_getList}" class="gradeX">
                                <td th:text="${activity_commodity.wl_commodity.commodityname}"></td>
                                <td th:text="${activity_commodity.cprice}"></td>
                                <td th:text="${activity_commodity.oprice}"></td>
                                <td th:if="${activity_commodity.hasfreight==1}" th:text="包邮"></td>
                                <td th:if="${activity_commodity.hasfreight==0}" th:text="不包邮"></td>
                                <td th:text="${#dates.format(activity_commodity.starttime,'yyyy-MM-dd')}" ></td>
                                <td th:text="${#dates.format(activity_commodity.expiredtime,'yyyy-MM-dd')}"></td>
                                <td th:text="${#dates.format(activity_commodity.createtime,'yyyy-MM-dd')}"></td>
                                <td th:text="${#dates.format(activity_commodity.updatetime,'yyyy-MM-dd')}"></td>
                                <td th:if="${activity_commodity.type==1}" th:text="聚划算"></td>
                                <td th:if="${activity_commodity.type==2}" th:text="0元购"></td>
                                <td th:if="${activity_commodity.type==3}" th:text="每周特惠"></td>
                                <td th:if="${activity_commodity.type==4}" th:text="新人专区"></td>
                                <td th:if="${activity_commodity.type==5}" th:text="节日活动"></td>
                                <td th:if="${activity_commodity.type==6}" th:text="新品"></td>
                                <td th:if="${activity_commodity.type==7}" th:text="热卖"></td>
                                <td th:if="${activity_commodity.status==0}" th:text="已过期"></td>
                                <td th:if="${activity_commodity.status==1}" th:text="未过期"></td>
                                <td th:text="${activity_commodity.describe}"></td>
                                <td>
                                    <!-- 修改 -->
                                    <div th:if="${activity_commodity.status==1}">
                                        <a th:href="@{../wl_activity_commodity_getById(id=${activity_commodity.id})}">
                                            <span class="glyphicon glyphicon-edit"></span>
                                        </a>
                                    </div>
                                    <!--删除-->
                                    <div th:if="${activity_commodity.status==1}">
                                        <a th:href="@{../wl_activity_commodityRemove(id=${activity_commodity.id})}">
                                            <span class="glyphicon glyphicon-remove"></span>
                                        </a>
                                    </div>
                                    <!-- 新增 -->
                                    <a th:href="@{wl_category_getByCateId}">
                                        <span class="glyphicon glyphicon-plus"></span>
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>



    <script src="js/plugins/jeditable/jquery.jeditable.js"></script>

    <!-- Data Tables -->
    <script src="js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>


    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function () {
            $('.dataTables-example').dataTable();

            /* Init DataTables */
            var oTable = $('#editable').dataTable();

            /* Apply the jEditable handlers to the table */
            oTable.$('td').editable('../example_ajax.php', {
                "callback": function (sValue, y) {
                    var aPos = oTable.fnGetPosition(this);
                    oTable.fnUpdate(sValue, aPos[0], aPos[1]);
                },
                "submitdata": function (value, settings) {
                    return {
                        "row_id": this.parentNode.getAttribute('id'),
                        "column": oTable.fnGetPosition(this)[2]
                    };
                },

                "width": "90%",
                "height": "100%"
            });


        });

        function fnClickAddRow() {
            $('#editable').dataTable().fnAddData([
                "Custom row",
                "New row",
                "New row",
                "New row",
                "New row"]);

        }
    </script>

    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码，可删除-->

</body>

</html>
